package com.yanqu.road.server.cmd.chefduel.process1.cross;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.chefduel.ChefDuelProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.activity.chefduel.ChefDuelMgr;
import com.yanqu.road.server.protocol.Protocol;



@Cmd(code = Protocol.S_CROSS_CHEF_DUEL_TO_CHEF_DUEL2, desc = "同步玩家晋级消息")
public class CrossWindUpCmd extends AbstractCommand {

	//小当家1活动id
	private int activityId;


	@Override
	public boolean parseData(YanQuMessage packet) throws Exception {
		return true;
	}

	@Override
	public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
		ChefDuelProto.CrossChefDuelWindUpMsg crossSyncMsg = ChefDuelProto.CrossChefDuelWindUpMsg.parseFrom(packet.getBytes());
		activityId = crossSyncMsg.getActivityId();
		ChefDuelMgr.syncChefDuelWindUp(activityId, crossSyncMsg.getUserIdListList());
	}

	@Override
	public void sendData(GamePlayer player) {

	}
}
